<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link href="../../css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
    <script src="../../js/plugins/jquery/jquery-2.1.1.min.js"></script>
    <script src="../../js/plugins/layer1/layer.js"></script>
    <style type="text/css">
        pre{
            margin-top: 10px;
        }
    </style>
</head>
<body>
<div style="margin: 30px;">
    <div class="row">
        <div class="col-lg-12">
            <a href="javascript:;" class="btn btn-outline btn-default" onclick="test()">测试效果</a>
            <br>
            <textarea id="edit" style="width: 100%;height: 200px;margin-top: 10px;"></textarea>
        </div>
    </div>
</div>
</body>
<script>
    function test(){
        var con = document.getElementById("edit").value;
        eval(con);
    }
</script>
</html>